import { SelectMixedOption } from "naive-ui/es/select/src/interface";

export interface IFormItem {
  name: string;
  enName?: string;
  prop: string;
  rules?: Array<any>;
  span?: number;
  options?: Array<SelectMixedOption>;
  required?: boolean;
  type:
    | "text"
    | "number"
    | "switch"
    | "select"
    | "image-upload"
    | "multi-image-upload"
    | "location"
    | "slider"
    | "time"
    | "date"
    | "file-upload"
    | "checkbox"
    | "color"
    | "radio"
    | "collapse"
    | "collapse-item"
    | "group"
    | "kv";
  columns?: Array<IFormItem>;
  props?: any;
  default?: any;
  visible: Array<Array<string> | string>;
}
export interface IForm {
  title: string;
  titleEn?: string;
  size?: "small" | "medium" | "large";
  labelWidth?: number | "auto";
  labelPlacement?: "top" | "left ";
  cols?: number;
  gap?: number;
  columns: Array<IFormItem>;
}
